<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组件的内容</title>
    <script src="https://cdn.bootcss.com/vue/2.6.11/vue.js"></script>
    <script src="js/jquery.js"></script>
    <script>
        $(function(){
            var vm1 = new Vue({
                el:'#mydiv',
                data:{
                    num:100
                },
                methods:{},
                components:{
                    'innercom':{
                        template:'<h2>这是我的局部组件</h2>',
                        // 组件的数据选项语法特殊性
                        data:function(){
                            return {
                                name:'tom',
                                age:18,
                                score:{
                                    projName:'web开发',
                                    scoreNum:99
                                }
                            }
                        },
                        methods:{
                            show(){}
                        }
                    }
                }
            })
        })
    </script>
</head>
<body>
    <div id="mydiv">
        
    </div>
</body>
</html>